<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=b, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    div {
        margin: 0 auto;
        width: 80px;
    }

    input[type=text] {
        width: 50px;
        height: 44px;
        outline: none;
        border: 1px solid #ccc;
        text-align: center;
        border-right: 0;
    }

    input[type=button] {
        height: 24px;
        width: 22px;
        cursor: pointer;
    }

    input {
        float: left;
        border: 1px solid #ccc;
    }
</style>

<body>
    <div>
        <input type="text" id="total" value="1" readonly>
        <input type="button" value="+" id="add">
        <input type="button" value="-" id="reduce" disabled>
    </div>
    <script>
        let total = document.querySelector('#total')
        let add = document.querySelector('#add')
        let reduce = document.querySelector('#reduce')
        add.addEventListener('click', function () {
            total.value++
            reduce.disabled = false
        })
        reduce.addEventListener('click', function () {
            total.value--
            if (total.value <= 1) {
                reduce.disabled = true
            }
        })
    </script>
</body>

</html>